<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:77:"F:\Yel_projuct\officiaWeb\public/tpl/admin\home_access\access_config_lst.html";i:1562893697;s:59:"F:\Yel_projuct\officiaWeb\public\tpl\admin\public\base.html";i:1563270889;}*/ ?>
<!DOCTYPE html>
<html class="x-admin-sm">
    
    <head>
        <meta charset="UTF-8">
        <title>后台管理-日志配置</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="/static/x-admin/css/font.css">
        <link rel="stylesheet" href="/static/x-admin/css/xadmin.css">
        <script type="text/javascript" src="/static/resources/js/jquery/jquery-2.0.0.min.js"></script>
        <script type="text/javascript" src="/static/x-admin/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="/static/x-admin/js/xadmin.js"></script>

        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <script>
        // 是否开启刷新记忆tab功能
        // var is_remember = false;
    </script>
    

<style type="text/css">
    

</style>


    <body>
    	
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">日志管理</a>
        <a>
          <cite>日志配置</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
    </div>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-fluid">
                      <div class="layui-row">
                          <form class="layui-form">

                            <input type="text" name="id1" value="<?php echo $data['id1']; ?>" hidden="hidden">
                            <input type="text" name="id2" value="<?php echo $data['id2']; ?>" hidden="hidden">

                            <hr class="layui-bg-green">
                            <div class="layui-card">
                              <div class="layui-card-header"><h2>前台日志访问配置</h2></div>
                              <div class="layui-card-body">
                                <div class="layui-form-item">
                                  <label class="layui-form-label">是否开启记录</label>
                                  <div class="layui-input-block">
                                    <input type="radio" name="status1" value="0" title="关闭" <?php if($data['status1'] == '0'): ?>checked<?php endif; ?>>
                                    <input type="radio" name="status1" value="1" title="开启" <?php if($data['status1'] == '1'): ?>checked<?php endif; ?>>
                                  </div>
                                </div>
                                <div class="layui-form-item" id="flag1">
                                  <label class="layui-form-label">黑白名单记录</label>
                                  <div class="layui-input-block">
                                    <input type="radio" name="flag1" value="0" title="关闭" <?php if($data['flag1'] == '0'): ?>checked<?php endif; ?>>
                                    <input type="radio" name="flag1" value="1" title="开启黑名单" <?php if($data['flag1'] == '1'): ?>checked<?php endif; ?>>
                                    <input type="radio" name="flag1" value="2" title="开启白名单" <?php if($data['flag1'] == '2'): ?>checked<?php endif; ?>>
                                    <input type="radio" name="flag1" value="3" title="开启黑白名单" <?php if($data['flag1'] == '3'): ?>checked<?php endif; ?>>
                                  </div>
                                </div>
                              </div>
                            </div>

                            <div class="layui-card">
                              <div class="layui-card-header"><h2>后台日志访问配置</h2></div>
                              <div class="layui-card-body">
                                <div class="layui-form-item">
                                  <label class="layui-form-label">是否开启记录</label>
                                  <div class="layui-input-block">
                                    <input type="radio" name="status2" value="0" title="关闭" <?php if($data['status2'] == '0'): ?>checked<?php endif; ?>>
                                    <input type="radio" name="status2" value="1" title="开启" <?php if($data['status2'] == '1'): ?>checked<?php endif; ?>>
                                  </div>
                                </div>
                                <div class="layui-form-item" id="flag2">
                                  <label class="layui-form-label">黑白名单记录</label>
                                  <div class="layui-input-block">
                                    <input type="radio" name="flag2" value="0" title="关闭"  <?php if($data['flag2'] == '0'): ?>checked<?php endif; ?>>
                                    <input type="radio" name="flag2" value="1" title="开启黑名单" <?php if($data['flag2'] == '1'): ?>checked<?php endif; ?>>
                                    <input type="radio" name="flag2" value="2" title="开启白名单" <?php if($data['flag2'] == '2'): ?>checked<?php endif; ?>>
                                    <input type="radio" name="flag2" value="3" title="开启黑白名单" <?php if($data['flag2'] == '3'): ?>checked<?php endif; ?>>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <hr class="layui-bg-green">
                            <div class="layui-form-item">
                                <label for="L_repass" class="layui-form-label">
                                </label>
                                <button  class="layui-btn" lay-filter="save" lay-submit="">
                                    保存
                                </button>
                            </div>
                        </form>
                      </div>
                      <div>注：<span style="color: red;">先开启了记录才会有黑白名单记录</span></div>
                  </div>
                </div>
            </div>
        </div>
    </div> 

        
    <script>
      layui.use(['laydate','form'], function(){
        var laydate = layui.laydate;
        var form = layui.form;

        
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });

        //监听提交
        form.on('submit(save)',
        function(data) {
            //post提交
          $.post("<?php echo url('admin/HomeAccess/access_config_edit'); ?>",data.field,function(e){
            if(e.code == 200){
              layer.alert(e.msg, {
                  icon: 6
              });
              return false;
            }
            layer.alert(e.msg, {
                icon: 5
            });
            return true;
          });
          return false;
        });
      });

    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();</script>

    </body>
</html>
